package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.data.DataDashboard;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("/data")
public class DataDashboardController {

    @GetMapping("/dataDashboard")
    public AjaxResult dataDashboard() {
        DataDashboard makeAnAppointment = new DataDashboard();
        //预约数据
        makeAnAppointment.setTodayAppointment("10");
        makeAnAppointment.setThisWeekAppointment("20");
        makeAnAppointment.setLastMonthAppointment("30");
        makeAnAppointment.setNextWeekAppointment("40");

        //达成数据
        makeAnAppointment.setConcludeDataTotal("03223");

        //近期考试
        List<HashMap<String, String>> examSchedule =new ArrayList<>();



        HashMap<String, String> map = new HashMap<>();
        map.put("column1", "2025-03-26");
        map.put("column2", "2025年第1周精术计划考核");
        examSchedule.add( map);
        makeAnAppointment.setExamSchedule(examSchedule);





        //通知
        HashMap<String, String> informMap = new HashMap<>();
        informMap.put("title", "这个是通知的标题");
        informMap.put("content", "    这个是通知的内容内容内容内容内容，内容内容内容内容，内容内容内容内容，内容内容内容内容，内容内容内容内容，内容内容内容内容，内容内容内容内容");
        informMap.put("startTime", "2023-07-04");
        makeAnAppointment.setInform(informMap);

        //平台介绍
        makeAnAppointment.setPlatformIntroduction("本系统基于云平台系统搭建，可实现辖区内相关人员的岗前培训、职业学习、年度考核、证书管理等系统管理功能。");

        return AjaxResult.success(makeAnAppointment);
    }
}
